home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Orlando_1993 / Devcon93.1 / AREXX / SimpleRexx / test.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1993-01-11  |  1.3 KB  |  81 lines

  1. /*
  2.  * File: test.rexx
  3.  *
  4.  * SimpleRexx test...
  5.  *
  6.  * You need to run the SimpleRexxExample first...
  7.  */
  8.  
  9. Options FailAt 100
  10.  
  11. Options Results
  12.  
  13. /*
  14.  * Try to read the window title bar
  15.  */
  16. Address EXAMPLE.1 ReadTitle
  17.  
  18. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  19. else say 'Window title is 'Result
  20.  
  21. /*
  22.  * Bad WINDOW command...
  23.  */
  24. Address EXAMPLE.1 "Window Display"
  25.  
  26. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  27. else say 'Window is now open'
  28.  
  29. /*
  30.  * Open the window
  31.  */
  32. Address EXAMPLE.1 "Window Open"
  33.  
  34. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  35. else say 'Window is now open'
  36.  
  37. /*
  38.  * Open the window
  39.  */
  40. Address EXAMPLE.1 "Window Open"
  41.  
  42. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  43. else say 'Window is now open'
  44.  
  45. /*
  46.  * Try to read the window title bar
  47.  */
  48. Address EXAMPLE.1 ReadTitle
  49.  
  50. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  51. else say 'Window title is 'Result
  52.  
  53. /*
  54.  * Hide the window
  55.  */
  56. Address EXAMPLE.1 "Window Close"
  57.  
  58. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  59. else say 'Window is now closed'
  60.  
  61. /*
  62.  * Try to hide the window again
  63.  */
  64. Address EXAMPLE.1 "Window Close"
  65.  
  66. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  67. else say 'Window is now closed'
  68.  
  69. /*
  70.  * Send a command that does not exist
  71.  */
  72. Address EXAMPLE.1 Junk
  73.  
  74. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  75. else say 'The command worked!!!'
  76.  
  77. /*
  78.  * Quit the program...
  79.  */
  80. Address EXAMPLE.1 Quit
  81.